]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: make sure to break the grab when the slider is not visible
authorStefano Facchini <stefano.facchini@gmail.com>
Fri, 23 Mar 2012 18:32:17 +0000 (19:32 +0100)
committerStefano Facchini <stefano.facchini@gmail.com>
Tue, 24 Apr 2012 20:37:19 +0000 (22:37 +0200)
Otherwise the grab will persist for example after closing the PopupMenu
with Escape.

https://bugzilla.gnome.org/show_bug.cgi?id=672713

js/ui/popupMenu.js

index ace32e013404e72919f0a28c562a7db7b1ae3f98..09a9b737dc1e316043756191cb9394475268fda7 100644 (file)
@@ -546,6 +546,10 @@ const PopupSliderMenuItem = new Lang.Class({
         this._slider.connect('repaint', Lang.bind(this, this._sliderRepaint));
         this.actor.connect('button-press-event', Lang.bind(this, this._startDragging));
         this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
+        this.actor.connect('notify::mapped', Lang.bind(this, function() {
+            if (!this.actor.mapped)
+                this._endDragging();
+        }));
 
         this._releaseId = this._motionId = 0;
         this._dragging = false;